Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add negative leak test for iOS #6449

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

niklasberglund
Copy link
Collaborator

@niklasberglund niklasberglund commented Jul 5, 2024

Add a negative leak test. This is a draft PR. The implementation should almost be there, but the main issue with the test right now seems to be that getConnectedThroughRelayDateInterval is returning a longer date interval for the relay connection than expected. I believe its a bug in the test code but it could also be that the stored data is incorrect. Had to work with stored data because of the ongoing move.

To try it out run testNegativeLeaks under LeakTests. The test device must be connected to the app-team-ios-tests WiFi to be able to reach the packet capture API and firewall API.


This change is Reviewable

@niklasberglund niklasberglund added the iOS Issues related to iOS label Jul 5, 2024
@niklasberglund niklasberglund force-pushed the iOS-negative-leak-tests branch from 45b5c0e to dc55447 Compare July 5, 2024 16:10
Copy link
Collaborator Author

@niklasberglund niklasberglund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on @pinkisemils)


ios/MullvadVPNUITests/Networking/StreamCollection.swift line 160 at r1 (raw file):

        }

        return DateInterval(start: startDate!, end: endDate!)

Left some illegal force unwrapping in this function which should probably be fixed 👮

Copy link
Collaborator Author

@niklasberglund niklasberglund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 13 files reviewed, 2 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPNUITests/Base/BaseUITestCase.swift line 110 at r1 (raw file):

        let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")

        if springboard.buttons["Allowi"].waitForExistence(timeout: Self.shortTimeout) {

Typo "Allowi"

Copy link
Collaborator Author

@niklasberglund niklasberglund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 13 files reviewed, 3 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPN.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved line 0 at r1 (raw file):
Restore 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants